<%@page import="com.portal4kids.controller.PeopleManager"%>
<%@page import="java.util.ArrayList"%>
<%@page import="com.portal4kids.model.PeopleVisitPlan"%>
<%@page import="java.util.List"%>
<%@page import="com.portal4kids.model.People"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="css/themes/base/jquery.ui.all.css">
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<link rel="stylesheet" href="css/search_style.css">
<link rel="stylesheet" href="css/detail_style.css">
<title>Portal4kids - Panel Użytkownika</title>

<style>
		body { font-size: 62.5%; }
		a {color: black;}
		a:HOVER {color: grey;}
		fieldset { padding:0; border:0; margin-top:25px; }
		h1 { font-size: 1.2em; margin: .6em 0; }
		div#users-contain { width: 775px; margin-left: auto; margin-right: auto;}
		div#users-contain table { margin: 1em 0; border-collapse: collapse; width: 100%; }
		div#users-contain table td, div#users-contain table th { border: 1px solid #eee; padding: .6em 10px; text-align: left; }
		.ui-dialog .ui-state-error { padding: .3em; }
		.validateTips { border: 1px solid transparent; padding: 0.3em; }
</style>		
</head>
<body background="images/bg_search.jpg">
<div id="top">
 <ul id=menu>
       <li><a href="index.jsp">home</a></li>
      <li><a href="baner/newses.jsp">aktualności</a></li>

      <li><a href=#>oceny</a></li>
      <li><a href="baner/aboutAs.jsp">o nas</a></li>
      <li><a href="baner/contact.jsp">kontakt</a></li>
    </ul>
</div>
		
<%						List<People> people = new ArrayList<People>();
						people = (List<People>)session.getAttribute("lista");
						
						List<PeopleVisitPlan> visitPlan = new ArrayList<PeopleVisitPlan>();
						PeopleManager man = new PeopleManager();
						visitPlan = man.getPlanListFromDB(people.iterator().next().getId_people()); %>		
<div id="users-contain" class="ui-widget">	
	<div id="d_all">
      <div id="d_top1">
     
             <div class="d_a">
              <div class="a">Nazwa </div>
             </div>
             <div class="d_b" style="width: 150px;">
                <div class="b"><%= people.iterator().next().getFirstname() + " " + people.iterator().next().getSurname() %></div>
             </div>
             
             <div class="d_a">
                <div class="a">Dzielnica</div>
             </div>
             <div class="d_b">
                <div class="b"><%= people.iterator().next().getAdress() %></div>
             </div>
             
             <div class="d_a" style="margin-left: 60px;">
                <div class="a"><a href="javascript:history.back()">Powrót</a></div>
             </div>
             
        
      </div>
      
      <div id="d_bottom">
        <div id="d_bottom_userPanel">
        <h2 style="color:black; text-align: center;">Plan Wizyt:</h2> </br>
        		<div id="users-contain" class="ui-widget">
			<table id="users" class="ui-widget ui-widget-content" align=center>
					<thead>
					<tr class="ui-widget-header ">
						<th>Poniedziałek</th>
						<th>Wtorek</th>
						<th>Środa</th>
						<th>Czwartek</th>
						<th>Piątek</th>
						<th>Sobota</th>
						<th>Niedziela</th>
					</tr>
					</thead>
					<tbody>
					
						
							<tr>
								<td ><%= visitPlan.iterator().next().getMonday() %></td>
								<td ><%= visitPlan.iterator().next().getTuesday() %></td>
								<td ><%= visitPlan.iterator().next().getWednesday() %></td>
								<td ><%= visitPlan.iterator().next().getThursday() %></td>
								<td ><%= visitPlan.iterator().next().getFriday() %></td>
								<td ><%= visitPlan.iterator().next().getSaturday() %></td>
								<td ><%= visitPlan.iterator().next().getSunday() %></td>
							</tr>	
				</table>
		</div>
        </div>
      </div>
  </div>
	
</div>	
		

</body>
</html>